package com.hy.example.common.defs;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.util.Locale;
import java.util.TimeZone;

public interface CommonDefs {

    String TOP_PACKAGE_BASE = "com.hy.example";

    String PROD_NAME = "hy-mining";

    String RESTFUL_API_BASE_CONTEXT = "/rest";
    String FACADE_API_BASE_CONTEXT = "/facade";
    String WEBSOCKET_BASE_CONTEXT = "/ws";
    String API_V1 = "/v1";

    String RESTFUL_URI_CONTEXT = RESTFUL_API_BASE_CONTEXT + API_V1;
    String FACADE_URI_CONTEXT = FACADE_API_BASE_CONTEXT + API_V1;
    String WEBSOCKET_URI_CONTEXT = WEBSOCKET_BASE_CONTEXT + API_V1;


    Locale DEFAULT_LOCALE = Locale.SIMPLIFIED_CHINESE;

    String DEFAULT_CHARSET_NAME = "UTF-8";
    Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

    String DEFAULT_TIME_ZONE_NAME = "GMT+8";

    TimeZone DEFAULT_TIME_ZONE = TimeZone.getTimeZone(DEFAULT_TIME_ZONE_NAME);

    ZoneId DEFAULT_ZONE_ID = DEFAULT_TIME_ZONE.toZoneId();

    ZoneOffset DEFAULT_ZONE_OFFSET = ZoneOffset.ofTotalSeconds(DEFAULT_TIME_ZONE.getRawOffset() / 1000);

    String AVAILABLE_FIELD_NAME = "available";

    String STR_SPLIT_DELIMITER = ",";

    String STR_SPLIT_COLON = ":";

}
